﻿using System.Linq;
using Grundy.Common;
using Grundy.Message;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FluentAssertions;

namespace Grundy.CryptographicServices.Tests
{
    [TestClass]
    public class WindowsApiIdentityProviderTests
    {
        [TestMethod]
        public void Should_Get_Identifiers()
        {
            var processIdentityProvider = new WindowsApiIdentityProvider();
            var identifiers = processIdentityProvider.GetIdentifiers();
            Assert.AreEqual("WindowsApiIdentityProvider", processIdentityProvider.Type);
            identifiers.Count().Should().BeGreaterOrEqualTo(3);
            identifiers.Should().Contain(i => i.GetType() == typeof(CheckoutIdentifier));
            identifiers.Should().Contain(i => i.GetType() == typeof(BiosIdentifier));
            identifiers.Should().Contain(i => i.GetType() == typeof(ProcessorIdentifier));
        }
    }
}